package org.megha.blog.example.threads;

public class ThreadUnsafeCounter {

	private int count = 0;

	public int getCount() {
		return count;
	}

	// unsafe when multiple threads try to increment at the same time.
	// ALL callers need to use ensure that they do not call increment at the same
	// time. This may be done using explicit synchronize blocks.
    public void increment() {
		count++;
	}
}
